home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
ada
/
gwuada_0.zip
/
userman.dos
< prev
Wrap
Text File
|
1994-06-21
|
32KB
|
738 lines
GWAda Program Development Environment
-------------------------------------
User Manual
January 1994
Prof. Michael B. Feldman
Department of Electrical Engineering and Computer Science
The George Washington University Washington, DC 20052
(202) 994-5253 (voice)
(202) 994-5296 (fax)
mfeldman@seas.gwu.edu (Internet)
This project was sponsored by The George Washington University, and in
part by the United States Advanced Research Projects Agency (ARPA)
under contract #FY3592-93-10234, administered by Phillips Laboratory,
Kirtland AFB, NM 87117-5776.
Copyright (C) 1993,
Charles W. Kann, Arthur Vargas Lopes, and Michael Bliss Feldman
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
GWAda User Manual January 1994 page 1
I. ABOUT THE GWAda DEVELOPMENT ENVIRONMENT
GWAda is a development environment built around the NYU AdaEd
compiler/interpreter. It allows the editing, compiling, binding and
execution of Ada 83 programs.
GWAda was supervised by Prof. Michael B. Feldman. Dr. Arthur V. Lopes
wrote the editor and associated tools; Charles A. Kann, a GWU doctoral
student in Computer Science, is responsible for the run-time monitoring
capabilities.
GWAda User Manual January 1994 page 2
II. INSTALLATION
When you un-archive the files (see the instructions below), you will
find a user manual, userman.doc, describing the GW development
environment, and a file readme.nyu file with documentation on the NYU
part of the system. Note that you do not have to use the GWAda
integrated environment, but can execute the various parts of NYU Ada/Ed
from the DOS command line, as described in the NYU instructions.
System Requirements
-------------------
IBM PC Compatible, 386 or 486, running MS-DOS or PC-DOS
at least 3.6 mb available extended memory
at least 5 mb free hard disk space
Installing GWAda
----------------
Assuming that:
first diskette is in drive B:
the target hard disk is C:
1 - The installation process will create a directory named ADAED
to store everything, so first position to the desired hard disk.
cd C:\
2 - Copy unzip.exe from the diskette to the hard drive
copy b:\unzip.exe .
3 - Unzip the first archive
unzip b:\support.zip
then change to the adaed directory, replace the first diskette with
the second, and type
c:\unzip b:\binaries.zip
4 - Create a working directory for your Ada programs:
mkdir c:\adaed\myprogs
5 - Add c:\adaed to your DOS path, for example
path=c:\adaed;c:\;c:\dos
GWAda User Manual January 1994 page 3
6 - create the adaed environment variable:
set adaed=c:\adaed
You might wish to add steps (4) and (5) to your autoexec.bat file, or
create a separate setup.bat just to run when you need to use GWAda.
7 - Change to your working directory
cd c:\adaed\myprogs
GWAda User Manual January 1994 page 4
III. USING GWAda
This section gives a tutorial on using GWAda.
A First Compilation and Execution using GWAda and Runtime Monitoring
-------------------------------------------------------------------
1 - Copy the Ada demonstration programs from the directory
\ADAED\GWUDEMOS to your working directory
copy \adaed\gwudemos\*.* .
2 - Start GWAda by typing "GWAda FIRST.ADA"
3 - The GWAda editor should now be running, with the source for
the program FIRST.ADA in the window. First, create a new
library as follows:
Press the ESC key to put the menu bar at the top of the screen.
Type O to select the options menu.
Type N to select a new library.
A New library has been created.
4 - You should still be on the menu bar. Type C to select compile, then
C again to indicate that the file in the current window is to be
compiled.
5 - When the compilation is done, you will no longer have the menu bar.
Press the ESC key to bring up the menu bar, and type B to bind
(link) the program.
6 - You will be asked for the program to bind. Select "first" by
pressing ENTER. The program is now bound (linked).
7 - Type R to run the program. When asked which program to run, select
"first".
8 - You should now have up the monitor screen.
9 - Press ESC to take the default options on the first screen
(speed = 6, exceptions = yes, and tasks = no). Press ESC again to
take the defaults on the second screen (Small window, line
tracing, and no procedure tracing).
10 - Now the monitor should be running, stopped at the elaboration of
the variable Name. Press the space bar until the program asks for
your name, then once more so that it will reach the Get_Line
statement. Type in your name, then press return. Continue to
press the space bar until the program completes execution.
GWAda User Manual January 1994 page 5
Compiling a Program That Isn't in the Current Window
----------------------------------------------------
To use the rest of the demo programs, you will need to compile some
input/output instances. These are in the file IO_LIBS.ADA. Press ESC
to reveal the menu bar, then C to request compilation, then select
"select unit" to select a file from the working directory. You will get
a window showing the directory followed by *.ADA. Press ENTER; you will
then see a window showing all the files with file type .ADA. Use the
down-arrow key to select IO_LIBS.ADA; this file will then be compiled.
Using the GWAda Runtime Monitor to Trace Subprogram Calls
---------------------------------------------------------
To demonstrate subprogram tracing we use the program FIBB.ADA. This
program calculates a Fibonacci number by summing the two previous
Fibonacci numbers. The Fibonacci series is
1 1 2 3 5 8 13 21 ...
It was developed originally to model the growth of a colony of rabbits.
The Fibonacci function is recursive, so running the program will lead
to a large number of nested recursive calls. Compile this program,
then bind it as before.
To see the execution tracting, take the default options on the first
Run screen (speed = 6, exceptions = yes, and tasks = no)
Change from a Small Window to a Large Window on the second screen.
The purpose of this program is to show a large amount of recursion.
Therefore, when prompted for the number to be calculated, choose 7.
This will cause Fib_Calc to be called recursively many times..
Notice that each time Fib_Calc is called, a new window is opened until
the screen is filled with windows. At that point, no new windows are
created, but notice that the highest level window "Scrolls" off to the
upper right and is no longer visible.